package com.longcai.piaojia.activity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.LinearLayout;

import com.longcai.piaojia.BaseApplication;
import com.longcai.piaojia.R;
import com.longcai.piaojia.dialog.WarnningDialog;
import com.zcx.helper.bound.BoundView;
import com.zcx.helper.util.UtilApp;

/**
 * Created by Administrator on 2016/11/10.
 */
public class ProjectDetailWebActivity extends BaseActivity implements View.OnClickListener {


    @BoundView(R.id.project_detail_web_bottom_ll) private LinearLayout project_detail_web_bottom_ll;
    @BoundView(R.id.project_detail_wv) private WebView project_detail_wv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_project_detail_web);

        Bundle bundle = getIntent().getExtras();

        String url = bundle.getString("url", "www.baidu.com");

        String title = bundle.getString("title", "");

        setBackTrue();

        setTitleName(title);

        project_detail_wv.loadUrl(url);

        project_detail_web_bottom_ll.setOnClickListener(this);




    }

    @Override
    public void onClick(View v) {

        switch (v.getId()) {

            case R.id.project_detail_web_bottom_ll:

                new WarnningDialog(this, BaseApplication.BasePreferences.readCustomServiceTel(), getString(R.string.cancel_text), getString(R.string.confirm_text)) {
                    @Override
                    protected void onConfirm() {

                        UtilApp.call(ProjectDetailWebActivity.this, BaseApplication.BasePreferences.readCustomServiceTel());

                    }
                }.show();

                break;
        }
    }
}
